from airtest.core.api import *

from utils import commom_utils

"""
docs: https://airtest.readthedocs.io/zh-cn/latest/all_module/airtest.core.api.html#airtest.core.api.start_app
https://en.casclash.com/

"""
GAME_PACKAGE_NAME = 'com.igg.castleclash_tw'
SNAPSHOT_DIRECTORY = './snapshots'

# 連接設備
init_device("Android")

# 安裝應用
# install("./apk/CastleClash_TW_41005000rel.apk")
# uninstall(GAME_PACKAGE_NAME)
# 啟動應用
# start_app(GAME_PACKAGE_NAME)
# 停止應用
# stop_app(GAME_PACKAGE_NAME)

# 截圖
commom_utils.get_screenshot(SNAPSHOT_DIRECTORY)

# touch(Template("start_app.jpg"))
# swipe(Template("slide_start.png"), Template("slide_end.png"))

# keyevent("BACK")
# home()
